package com.lingnan.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import jakarta.validation.constraints.*;

import java.util.Date;


@Data
public class JobApplication {
    @TableId(type = IdType.AUTO)
    private Long id;

    @NotNull(message = "职位ID不能为空")
    private Long positionId;

    @NotNull(message = "简历ID不能为空")
    private Long resumeId;

    private String fileUrl;
    @NotNull(message = "求职者ID不能为空")
    private Long seekerId;

    @Min(value = 0, message = "状态必须为0-4之间")
    @Max(value = 4, message = "状态必须为0-4之间")
    private Long status = 0L;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date applyTime;

    // 非数据库字段，用于展示
    @TableField(exist = false)
    private JobPosition position;

    @TableField(exist = false)
    private JobSeeker seeker;

}